At SMSA : Steve, Geoff & Kelly (new attendee).
Via jitsi : John, Andrew, Bob & Anthony.
Andrew
Uses a PIC12 and FTDI (XC4424 jaycar) to convert a datalogger's RS232 interface to serial USB. The PIC12 adds 2 hardware control lines that the datalogger uses. There's a full description and source code below the photo.
Modernising an Existing Instrument by use of a PIC12F629
A recording system used an RS232 serial interface to manually set a real time clock using Tera Term and carry out other function. Additionally one toggle switch and a push button had to be operated by a user. The requirement was to automate all functions by using a support program running in a modern PC and change the interface to use USB without needing to make changes to the firmware of the recording system.
The instrument interface firmware responds to four single character commands (D H M T followed by <enter>) and will ignore all other character sequences, producing only a prompt string in reply.
A USB to TTL board (XC-4464) provides the USB port and a PIC12F629 is used to monitor all traffic from the PC. Character sequences are defined that only the PIC12F629 will act on to operate the reset and mode-control lines.
The reset button only needs to be pressed for a short time so the PIC12 can generate a short pulse from the QQQ command sequence by switching on a transistor (which pulls the recording instrument reset line low) for a short time.
The mode control line needs to be held high for long periods and is simply driven directly from an output pin of the PIC12. The two sequences used are XXX and YYY.
The new serial interface is housed in a clear Jiffy box that allows LEDs to be viewed.
The PIC12 also controls two LEDs which indicate the status of the CPU reset line and Mode line.
PIC12 C code listing
// Interface uses USB to TTL converter plus PIC12 bit line control
// RAM 17% used , ROM 16% used
// PIC12F629 detects runs of the same character
// Mode is a bit line and CPU reset button is a bit line via TR1
// Instrument treats XXX YYY QQQ as errors and so ignores them
// The PIC12 decodes them and ignores other traffic
// if XXX switch mode line high
// if YYY switch mode line low
// if QQQ pulse PCU reset line
#include <PICtoUSB.h>
void main()
{
char first;
int8 Xes=0;
int8 Yes=0;
int8 Qes=0;
output_low(Mode);
output_low(CPUreset);
while (TRUE) {
first=getc();
if (first=='X') { ++Xes; Yes=0; Qes=0; }
if (first=='Y') { ++Yes; Xes=0; Qes=0; }
if (first=='Q') { ++Qes; Xes=0; Yes=0; }
if (Xes>runMax) {output_high(Mode); Xes=0;}
if (Yes>runMax) {output_low(Mode); Yes=0;}
if (Qes>runMax) {
output_high(CPUreset);
delay_ms(DELAY);
output_low(CPUreset);
Qes=0; }
}
}
Jeff
Showed a 'test board' that has a range of I/O devices permanently connected to enable easy prototyping and testing. He had a working demonstration. Features include Remote Control, relays, servo, microphone, pots, drivers, push buttons etc. Processor is an Arduino Mega (I think) with an expansion shield. Here is the photo.
Steve
Showed a 5V UPS with LiPo charger module (based on TP4056 IC). The charger module has a 'power path' modification added to power the load directly from the plug pack when it is operating. The TP4056 module design omits this. With the modification, the LiPo only provides power when the plug pack isn't.