I just posted a description of a tangible concept demo I recently built.
There were a few new things in this, such as learning how to use the serial connection, working with a optical isolator, that I did my usual step-by-step approach to it.
First, I needed to learn how to use serial communication between two microcontrollers. I used a Trinket and an ItsyBitsy I had lying around, connected them, and programmed them to send and receive data on the serial port using a version of the basic Arduino Serial example sketch. Good.
Then, as I didn’t have an optoisolator around, I made one from an LED and photoresistor I had lying around.
I then played around with the serial communication through that, learning about sensitivity, slowness, and the like. But it was enough to nudge me into researching optoisolators to get for the next steps.
Next step was to pass serial communication between the two boards, but via a proper optoisolator.
I’m not going to mention all the interesting errors I did trying to work this up, but suffice it to say, opoisolators are quite interesting chips (and thank good ness for data sheets and application guides from the manufacturer).
Once I understood how the optoisolator worked, I then programmed ATtiny84 microcontrollers to use the optoisolators and wired up a breadboard with jumpers to see if I could replicate things with the bare chips.
When I was satisfied with that, I started adding buttons and more LEDS and added more functionality to the code until I had something working. To clean things up, I then made used some cut-to-size wiring to make it easier to use the breadboard proto.
Here it is, mid-build (notice optoisolator at center not yet connected).
I did a write up here, with a video of the prototype in action.
Enjoy.
Where do I go from here?
I had worked up a proper schematic to help me built the proto. If I were to continue this, I’d make the schematic with a PCB in mind, lay it out, and then get some boards to actually build this – in a much smaller footprint.
Alas, I stopped the project at this stage. Perhaps I’ll get a nudge to pick this up later. 🙂