28X2 to drive a Rev-Ed 4x20 OLED to tell the time with a DS3231


Well-known member
I guessed the switches were there for test purposes, however the point I was trying to make is that if any of those buttons get pushed with the picaxe connected then 5v will get forced into a picaxe output pin.
Jack Yes like you say 5v would be forced into the picaxe pin. i can add diodes inline with the picaxe pin to prevent 5v entering the picaxe pins

I have just removed the loads that are switched and the code runs fine so seems to point to back emf issues from the electromagnet and possibly the motor actuator, not sure how to deal with this, maybe to opto isolate the inputs to the transistors to remove any path back, there can be a complete break including the GND terminal, because both loads are being reversed maybe only varisters are suitable, but won't work as well as a diode.

I haven't checked the voltage at the pendulum switch yet but i did take the 5v from the regulator to the +v of the pendulum switch, when i first built the board it was 12v and i got thinking thats not right so adapted it.

On the plans from Richard i did see that he had amended the plans to include a varistor on the elctromagnet, i guess he has similar issues with it causing an issue with the plc

Back to back 15V zeners at 1W looks to be the best way to sort emf issue or atleast i will give it a go


I have re-connected the electromagnet and code runs fine, tried it several times, all good, so it seems its the the actuator that is causing the problems, connected a varistor to the actuator terminals and so far its running correctly, so must be back emf problems and now is the time to find them
Last edited:


Senior Member
Perhaps you could isolate which relay operation(s) cause a reset? Change the code to something like the below for each pulse group (first, second, etc):
sertxd("first pulse on",13,10)
pause 100
low Q1
pause 100
sertxd("Q1 operated",13,10)
low Q2
pause 100
sertxd("Q2 operated",13,10)
low Q3
pause 100
sertxd("Q3 operated",13,10)
sertxd("first pulse off",13,10)


Well-known member
Perhaps you could isolate which relay operation(s) cause a reset?
Papaof2 Thank you for the reply, i removed the 2 loads that the 3 relays control, so just the relays connected and it ran fine, i re-connected the electromagnet and still ran fine, so re-connected the actuator and had problems, so seemed it was the actuator motor that caused so many problems, so connected a varistor across it and its run all night cycling through the code with everything working