CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: ComSoft6128 on 17:48, 28 November 22

Title: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: ComSoft6128 on 17:48, 28 November 22
Looking for something else I ran across the above article (on CPCRulez) from a 1988 issue of Practical Electronics:

https://cpcrulez.fr/hardware_montage_8x-temperature-analogue_interface.htm

Of minimal interest to myself but I thought might be something for the hardware fans to chew over.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: GUNHED on 16:30, 29 November 22
Pretty nice design, but the address decoding is a pain. 
Maybe somebody wants to overwork it for 2022?
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Bryce on 10:00, 30 November 22
Interesting. I built an almost identical circuit way back when, but to measure voltage instead of temperature. It was my CPC Multimeter (with datalogging :) ).

Bryce.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: ComSoft6128 on 10:02, 30 November 22
Datalogging - using a BASIC program?
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Bryce on 11:55, 30 November 22
Yup.

Bryce.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: GUNHED on 19:52, 30 November 22
Quote from: Bryce on 10:00, 30 November 22Interesting. I built an almost identical circuit way back when, but to measure voltage instead of temperature. It was my CPC Multimeter (with datalogging :) ).

Bryce.
Why don't you do a new version of it? Just to measure the Volts of the CPC itself.  :o So, eventually we can tell how much Volts our CPC gets. And then all nicely packed on a M4 card. Should be easy for you since you already made your schematics. Sadly the F1-D clone was to complex I guess. I'm sure you would do the CPC scene a great favour.  :)
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Bryce on 09:30, 01 December 22
I'll have to go searching. The schematics were most likely hand drawn, I didn't have fancy software back then. I'd also have to make some changes though if it's to measure the voltage that it's being fed by. That's a bit more complicated.

Bryce.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: GUNHED on 03:21, 04 December 22
Hand drawn schematics! Put them on ebay and you won't need to work next year.  :laugh:
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Bryce on 11:08, 04 December 22
Quote from: GUNHED on 03:21, 04 December 22Hand drawn schematics! Put them on ebay and you won't need to work next year.  :laugh:

I doubt that. They aren't a hand drawn original of the Altair 8800 schematics, just an AD converter for a CPC. :)

Bryce.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: zhulien on 19:34, 05 December 22
i was thinking how cool it would be to program a robot arm or even an entire robot on the CPC - Johnny 5 style.  Even the hand likely needs a dozen I/Os, I wonder if you know any controllers that could connect to a CPC via serial port perhaps that give a useful number of I/Os for robot control? or perhaps house and lighting control?  I'm thinking a cool Inseminoid computer that is Amstrad CPC based.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Bryce on 20:31, 05 December 22
I have an Ambug Robot (in pieces) somewhere https://www.cpcwiki.eu/index.php/Ambug . It uses basic i/o to control two motors, but in theory you could connect hundreds of relays to a whole set of addresses and control whatever you wanted at whatever voltage the relays are designed for.

Bryce.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: revaldinho on 23:32, 05 December 22
Or you could try Lego Mindstorms sensors and motors. They all have I2C serial interfaces which the CPC is easily capable of bit banging out. There are many open source projects based around Arduino or ESP32 micros for this.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Bryce on 09:38, 06 December 22
Yes, except that they are an incredibly expensive way of getting sensors or motors for a project. The sensors and motors are standard parts with a massive price increase for some plastic and a Lego logo.

Bryce. 
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: WacKEDmaN on 11:00, 06 December 22
Quote from: revaldinho on 23:32, 05 December 22Or you could try Lego Mindstorms sensors and motors. They all have I2C serial interfaces which the CPC is easily capable of bit banging out. There are many open source projects based around Arduino or ESP32 micros for this.
ive been looking into bitbanging i2c to drive some IOs via printer port...to either connect an arduino/esp32 or directly connect i2c based sensors.. (which i have a bunch of for arduino/esp stuff)
but not sure how to set it up to get the data in when theres only one input pin on the printer port..
..and how well will the cpc respond to sensor data...
bitbanging i2c on printer port is fine for output only (eg LCD display)..but input is the pain...

im thinking it would be easier to connect an arduino mega2560 on the expansion port and then using that to pull in the sensor data and send it to the cpc..aswell as other things (like usifac features)
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: ajcasado on 11:41, 06 December 22
Quote from: WacKEDmaN on 11:00, 06 December 22but not sure how to set it up to get the data in when theres only one input pin on the printer port..
For this you'll need to use an accurate timing and something like Manchester codification.
https://en.wikipedia.org/wiki/Manchester_code
Quote from: WacKEDmaN on 11:00, 06 December 22im thinking it would be easier to connect an arduino mega2560 on the expansion port and then using that to pull in the sensor data and send it to the cpc..aswell as other things (like usifac features)
If you already have a serial port on the CPC side like an Usifac, simply use it to communicate with the arduino.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: pelrun on 11:59, 06 December 22
The only thing you need to convert separate output and input pins into a real open-drain io is a logic-level fet transistor. Output pin goes to the gate, source goes to ground, and drain is connected to both SDA and the input pin. You would also need a pullup resistor on SDA if you haven't one already, as the output can only pull the bus low.

If you pick /STROBE as the output pin, the output pin will even behave as you expect instead of inverted.
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: WacKEDmaN on 13:13, 06 December 22
Quote from: ajcasado on 11:41, 06 December 22
Quote from: WacKEDmaN on 11:00, 06 December 22but not sure how to set it up to get the data in when theres only one input pin on the printer port..
For this you'll need to use an accurate timing and something like Manchester codification.
https://en.wikipedia.org/wiki/Manchester_code
Quote from: WacKEDmaN on 11:00, 06 December 22im thinking it would be easier to connect an arduino mega2560 on the expansion port and then using that to pull in the sensor data and send it to the cpc..aswell as other things (like usifac features)
If you already have a serial port on the CPC side like an Usifac, simply use it to communicate with the arduino.
well that was the plan...but usifac doesnt want to work on my system...
and yeah manchester encoding would be the way to go.. just like loading a tape in..
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: Animalgril987 on 00:31, 07 December 22
Joystick port could be used for input...
I believe the Ambug robot used the printer port for motor control, and joystick port for sensors?
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: WacKEDmaN on 02:54, 07 December 22
Quote from: Animalgril987 on 00:31, 07 December 22Joystick port could be used for input...
I believe the Ambug robot used the printer port for motor control, and joystick port for sensors?
i was thinking about using the Busy pin...
should also be able to use it as an input...and run the SDA line from it in both directions.. (SCL on strobe)
schematic says Busy pin is an out..but ive seen it used as an in..
Title: Re: Two-channel temperature interface plus dual analogue ports for the Amstrad
Post by: pelrun on 05:53, 07 December 22
Busy goes straight to the PPI, so it can be either input or output. It's definitely intended as input on the cpc, because it is a signal from the printer.

All the other pins on the printer port are latched and can only be outputs.

Don't put SCL on strobe - you don't want that inverted, and you actually *do* want SDA inverted (the transistor inverts it again, resulting in the correct sense.)
Powered by SMFPacks Menu Editor Mod