Tuesday, July 07, 2015

Cheap solar powered Arduino - Part 1

Most of the Arduino projects in mind live outdoors and involve wireless connectivity. This makes power an issue. Solar is an option, but local cells aren't cheap, and cheap cells take forever to get her. I wanted something cheap and readily available.

In this episode, we explore using $0.97 solar yard lights from Wal-Mart. For less than a buck, we get a 1.2V solar cell, a NiCad storage battery, and a few LED's and power sense boards for the junk box.

Power Availability:
Each unit contains a single 2/3 AA battery, with a 150mAh capacity.  We will be running four in series, to power the Arduino with 4.8v.  We don't know the output of our no-name solar cells, but we can guesstimate from their purpose.  As designed, the lights are off  during the day, and illuminate at night.  The LED's generally die overnight, indicating the 150mAh battery is significantly depleted. Since there is no photodetector present, the circuit charges the battery until the solar output falls off, indicating darkness.  The average day in North America is 16hrs, so our solar cell needs to provide >9mA. It doesn't appear our circuit is sophisticated enough to provide overcharge protection, so it probably doesn't provide much more either.  So until we know better, let's assume 10mAh. That's not much...

For simplicity, I just removed the circuit board and wired the solar cell and the battery in parallel, then the 4 units in series.  This gives us a 4.8V weathersafe power source.  If needed we can gang more modules together in parallel, but in the spirit of keeping this cheap, I'd like to avoid that.

Next Issue:
In Part 2, we will see how long our charged assembly will power our Arduino R3 Uno running blink, and a basic webserver running the Ethernet shield.

Tuesday, May 26, 2015

Light modification - Razor Pocket Mod

My daughters Razor Pocket Mod (Bella) needed a little spicing up, so I decided to add a tail light and a headlight.  This mod would give her another new feature to be excited about, and improve safety.

Step 1 - Acquiring the Parts
I went to Mike's Trailer Hitches in Riverdale, Ga. and picked up a red LED marker light to use as the tail light, and a white LED tag light to use as the headlight.  I choose LED lights because they are low current, won't burn out during the useful lifespan of the scooter, and because they functions as a diode (See "Special power considerations" below).

Figure 1 - Tail Light    
Figure 2 - Headlight

Step 2 - Tail Light Installation
The tail light installation was so simple I forgot to take pictures. It mounts with one bolt, so I drilled a 5/16" hole for mounting and a 1/4" hole for the wires. The installed light can be seen in Figure 1 above.

Step 3 - Headlight Installation
Installing the headlight was a little trickier, but not terrible. The faux headlight is a plastic dome, which will make a perfect cover for the installed light. First, I removed the faux headlight, then began drilling with a 3/4" holesaw. This is where it got interesting. The steering gooseneck was only 1/4" behind the plastic fairing, thus preventing the hole saw from even making contact with the plastic. This meant removing the entire fairing to drill the mounting hole, a step I had not planned for. It also caused the light to be forced forward about 3/8".

Figure 3 - Faux Headlight
Figure 4 - Pilot hole

Once installed the gooseneck forced the light forward about 3/8".  This proved not to be a problem as the gooseneck does not move relative to the fairing, and the light protruding would be hidden by the faux cover. Since the light wasn't snug in the mounting hole as a result of the protrusion, I applied some hot glue to the rear of the light to secure it.

Figure 5 - Behind Fairing
Figure 6 - Headight

Step 4 - Obtaining Switched Power
Wiring proved to be a little tricky.  The lights are 12V and the system is 24V. Also, for safety I wanted the lights on anytime the scooter is powered up. Finally, for simplicity I wanted the lights to go off with the main power switch to prevent the need for a second switch.

To tie the lights to the main power switch, I pulled the positive DC pin from the controller wiring harness, soldered a piece of 18ga wire to it, and reinserted it into the connector. Since the controller power is switched on/off by the main power switch, this would give me power only when the main power switch is on. Below you can see the skinny red wire leaving the connector from the same place as the Red power wire.

Figure 8 - Tapping the batteries

Step 5 - Creating the right ground potential
Because the controller connector supplies 24V to the controller, I needed a way to drop the voltage from 24VDC to 12V as required by the LED lights. I could have purchased 24V lights, but to be honest I forgot this was a 24V system when I purchased them. To accomplish this without adding a resistor, I added a ground lead between the two batteries as shown below. As before, I pulled a pin from the connector and soldered directly to the lug. The resulting circuit is as show in this block schematic (Fig 9)

Figure 8 - Tapping the batteries
Figure 9 - Circuit Schematic

NOTE: Special power considerations
Because we are tapping the batteries mid-stack, current can flow forward (+12V) and backward (-12V) relative to our new device. This means that a device placed in circuit where our lights are located in Fig 9 would experience +12V when on and -12V when off. This is unacceptable because it would drain the battery in storage, and expose the controller to voltages (-12VDC) for which it is not designed. To resolve this problem, we must add a diode to the new circuit branch to prevent reverse current flow. This is where the LED lights come in. Because they are diodes, they flow current (and illuminate) when the switch is closed and appear as an open circuit when the switch is closed. This makes them ideal for this application.

Figure 8 - Tapping the batteries
Figure 9 - Circuit Schematic

Step 6 - Wrapping Up
With lights installed and power configured, all that was left is to connect the lights to our power taps and dress the wiring. For the connections we used insulated spade lug connectors. to prevent shorts.  The new wiring was semi-neatly dressed to the frame and held in place with zip ties. Below are some pictures of the lights in action.

Final Thoughts
With a total cost of about $15, Tail lights and head lights are a great safety modification for your Bella Pocket Mod Scooter, and they are lots of fun for your kids.  I think my next mod will be to install a flasher circuit into the tail light that activates when the brake is applied.

Photos of the finished Light modification - Razor Pocket Mod


Figure 10 - Tail Light
Figure 11 - Headlight

Figure 12 - Headlight output in complete darkness
Figure 13 - Headlight visibility from 30ft

Figure 14 - Tail light visibility from 30ft