Please refer to my previous post. In a nutshell:
The circuit is supplied by a 15v ac dcc voltage which has both a power and digital command component.
My circuit is effective a 5v dc supply in parallel with an optocoupler circuit; the circuit I used is shown in the link above.
My circuit consists of ac in at J2 J4 Bridge rectifier to a 5v volatge regulator at IC2 for a 5v supply for the lighting and the digispark. In parallel with the optocoupler circuit. The optocoupler circuit requires 5v derived from the 5v dc supply. The optocoupler circuit sends a logic signal to Pin 2 of the digispark and the lighting is controlled via pins 1,3,4 and 5. I have shown tracks to holes in the board so that on the other side of the board I can solder sections of 5v LED self adhesive strip which can be independently controlled at J6,J7,J8,J9 with J10, J11,J12,J13 as ground.
I have also left holes at J1 and J5 in order to add a capacitor to provide a"stay alive" function for the dc supply. Since the capacitor is massive compared to the other parts I intend to solder flying leads to J1 and J5 and hide the cap somewhere in the body of the coach. As it is the components fit into the roof curve without too much difficulty.
Using the input from Micro Merlin (Thanks for the input) I revised the board and had some samples made, fully expecting to have to correct my mistakes. Mistakes were: Bridge rectifier around the wrong way,missed out a resistor, missed out a track from the optocoupler to the Attiny85. Despite this, once I rectified these errors on the sample boards it works!!! Lights go on and off from a dcc controller and when placed in a coach and pick up from the track lights go on and off. Job done I thought. I have modified the board to rectify my errors and the latest version is below. I have spaced things out to allow for components to be bent over to allow for a very small headroom. I also discovered that the ATTiny 85 Micro USB has a different footprint to the ATTiny 85 USB, the row of pins is 0.1" closer on the Micro USB so to allow for using both I added an extra header
There is now a problem which I cannot fathom! Everything works right up until the time I add a capcitor at C1. Then no response from the dcc circuit lights do not turn on or off. remove the capacitor from the circuit and everything works fine.
So far I have tried:
separating the input feed----same outcome
removing the track between the voltage rectifier and R3 connecting it directly to the digispark— same outcome
removing the link between C1 and the Opto connecting the opto to GND on the digspark— same outcome
a combination of all of the above----same outcome
Sa5v supply to digispark3H.fzz (43.9 KB) me thing happens all works fine until Capacitor added at C1 then no response form the dcc,
assisting it with 2.5lb lump hammer–different outcome same result!
Does anyone have any insight into what is happening. I cannot see what difference the Capacitor would have. It is there to provide a stay alive function for the regulator otherwise the lights will flicker. I do not see how it can be interfering with the dcc signal but clearly it is. Can anyone suggest a work around. Even better does anyone understand what is going on!?
Thanks for any suggestions
5v supply to digispark3H.fzz (43.9 KB)