Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:19 03 Jun 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Just a side project

Author Message
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2051
Posted: 07:28am 31 May 2026
Copy link to clipboard 
Print this post

Well guy's as I keep getting errors with my surface grinder project it is going to take Lyle to the rescue to finish it off.

So now I as had that spare 3.5" ILI9488 LCD I hooked up with my zero board only to find the touch would fail and doing a research Phill gave a while ago pointed me at the spi lines well finally I got the touch calibrated  

> option list
PicoMite MMBasic RP2040 V6.03.00RC14
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL CONSOLE
OPTION DISPLAY 26, 60
OPTION LCDPANEL ILI9488, LANDSCAPE,GP2,GP1,GP0,GP5
OPTION TOUCH GP4,GP3
GUI CALIBRATE 0, 4062, 4061, -840000, -866666


Now what I found was hitting enter in MCCC after I ran the program with Phill's code for the DS1820 thread.

50
Temp = 18.1°C
50
Temp = 18.1°C
50
Temp = 18.1°C
5
> mp = 18.1
> mp = 18.1°
> 0p = 18.1
> mp = 18.1°
> option list


As for this project if I'm correct we switch the active rather than the neutral line on the AC a 12 volt relay is needed so a new PCB will be designed.

Now my idea is as I have a 240 volt AC 30 watt heating belt that will cook a 25 litre fermenter so temperature control is needed.

So using the DS1820 we can keep a 22-26 C range so the beer ferment goes smooth and lets face it US Aussies just love a beer where temperature controlled ferment is needed to get that right drop.

Anyway thats my goal but honestly the PCB design will work for any temperature range we set it too with 2 relays that can switch AC loads to achieve the temperature ranges we need.

Regards Bryan
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8869
Posted: 09:17am 31 May 2026
Copy link to clipboard 
Print this post

I cheat. :-) STC-1000 temperature controller. £3.80 from AE including the necessary temperature sensor. Individual isolated Heat and Cool relays rated for mains. Available for 12VDC, 24VDC or AC mains supply.

I'm going to use two of these for controlling aquarium temperature. You configure the setpoint and the hysteresis, that's all you need. For heating only I will have the setpoint at 24.5°C and the hysteresis at 1°C. The heater then kicks in at 23.5°C (setpoint-hysteresis) and drops out at 24.5°C. The Cool contact will close at 25.5°C (setpoint+hysteresis) and drop out at 24.5°C. That makes it useful for either cooling fans or an overtemp alarm.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2051
Posted: 09:45am 31 May 2026
Copy link to clipboard 
Print this post

Well I guess I'm having fun with Claude tonight as here is the code for upto 8 DS1820's to hook upto 8 relays on a 2040 zero with my ILI9488


TempControl_v1.zip


So with meeting with Claude am I finally waking up to a world here writing MMBasic code is just asking Claude a few questions and the code is done.

Gotta say for a guy deciding to have some shed beers after waiting 6 months getting to know Claude has been a eye opener for me.

I did ask Claude to give me a sprint layout but it was a no go as it was a closed source so fun tomorrow in Sprint Layout making the board with a 2 relay option.
Edited 2026-05-31 19:56 by Bryan1
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1936
Posted: 10:29am 31 May 2026
Copy link to clipboard 
Print this post

I wonder... Could Claude (or similar) come up with Gerber plots. SL6 can import Gerbers and then all that's left is to add the TH pads, etc.

🤔
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2051
Posted: 10:44am 31 May 2026
Copy link to clipboard 
Print this post

  PhenixRising said  I wonder... Could Claude (or similar) come up with Gerber plots. SL6 can import Gerbers and then all that's left is to add the TH pads, etc.

🤔



Yea I was hoping Claude would design the circuit for me but where will the fun go of designing the boards for review go but eh we can't ask AI to do everything can we.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3259
Posted: 12:11pm 31 May 2026
Copy link to clipboard 
Print this post

Had a look at Claud's** code and it calls a DS18B20() Function that isn't included.
You could add one from the "tempr not working" thread but MMbasic has it's own.
TEMPR START GPxx,3 : Temp = TEMPR(GPxx)
Print Temp

The ",3" sets the resolution to 1/16°, ,2 = 1/8°, ,1 = 1/4° and ,0 = 1/2°. Lower resolutions convert faster.

The example above shows TEMPR(GPxx) immediately following TEMPR START but it doesn't need to. You can put other code between to make use of the 600mS or so it takes to do a conversion.
When reading multiple DS18B20s for maximum efficiency do all the TEMPR STARTs in a block, other code then all the TEMPR(GPxx)s in a block.
eg for 4 sensors on pins 4 to 7 (GP2 to GP5)
For n=4 to 7 : TEMPR START n,3 : Next

** Should we be using a capital "C" as claude isn't a person?
Edited 2026-06-01 08:00 by phil99
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2051
Posted: 05:21am 02 Jun 2026
Copy link to clipboard 
Print this post

Ok I'm working with claude to try and get my slave zero on my OV7670 camera setup for I2C
but keep getting errors.

PicoMite MMBasic RP2040 V6.03.00RC14
OPTION SYSTEM I2C GP14,GP15
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 288000


Now I put the
I2C SLAVE OPEN 0x30, 0, 256, i2c_int
in a file and ran it

[5] I2C SLAVE OPEN 0x30, 0, 256, i2c_int
Error : Pin not set for I2C


So why is this doing this when doing a list pins

GP11    15     OFF
GP12    16     OFF
GP13    17     OFF
GP14    19     Boot Reserved : SYSTEM I2C SDA
GP15    20     Boot Reserved : SYSTEM I2C SCL
GP16    21     OFF
GP17    22     OFF
GP18    24     OFF


The I2C is setup and it should just work
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2051
Posted: 06:01am 02 Jun 2026
Copy link to clipboard 
Print this post

Ok to explain this in more detail a few years ago I made up a piggyback Zero board for a OV7670 camera, today I finally brought it out to see if I could get it working.

So to get started we just tried to get the zero slave to open but kept getting conflicts now it clearly states in the manual for I2C2 GP14 and GP15 are listed as suitable pins.

this is the slave code

'
OPTION EXPLICIT
OPTION DEFAULT NONE

CAMERA OPEN GP8, GP10, GP11, GP12, GP13, GP0
' capture frame
I2C OPEN 100, 1000    ' master mode, no SETPIN needed
' send chunks to display Zero
I2C CLOSE


Now before we get to I2C

[5] Camera OPEN GP8, GP10, GP11, GP12, GP13, GP0
Error : Invalid display type


claude did suggest to open on the slave zero I2C as a master so my camera open command is the same as the command in the manual

CAMERA OPEN XLKpin,
PLKpin, HSpin, VSCpin,
RETpin, D0pin


the XLK pin GP8, PLK pin GP10, HS pin GP11, VS pin GP13, D0 pin GP0

Regards Bryan
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3259
Posted: 06:51am 02 Jun 2026
Copy link to clipboard 
Print this post

If you look at the Hardware Details page in the manual GP14 and GP15 are I2C channel 2.
So all commands using System I2C on those pins need to start with I2C2.
System I2C is always Open so trying to open or close it it wont work.
Just use:-
I2C2 WRITE addr, option, sendlen, senddata [,sendata ..]
and
I2C2 READ addr, option, rcvlen, rcvbuf
As per Appendix B.

Someone else will have to help with the camera.
Edited 2026-06-02 16:54 by phil99
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026