Car Ionizer Power Timer Build Project

by deadfish in Circuits > Electronics

55 Views, 1 Favorites, 0 Comments

Car Ionizer Power Timer Build Project

DSC00849.JPG
DSC00851.JPG

This project converts an off-the-shelf battery powered ionizer to run after people have left the car. It charges batteries when the 12V power outlet is on. When the 12V power goes off and the people leave the car, it waits two minutes and then turns the ionizer on for ten minutes. It includes a motion detector to keep it off if someone stays in the car once the power is off. (currently disabled)

The circuit uses a solid state relay to control the physical power toggle button of the ionizer. This eliminates the need to know the voltages and polarity of the connections. It also isolates the switch control so that it doesn’t cause problems with the power connections for charging the ionizer.

The amount of time spent in seconds for each phase can be changed by editing the defines ending in _SEC in the program source.

The motion detector is ignored in the source shown here. It looks like there is interference from the ionizer. (I’ll be working on that later. Maybe put the detector on a long cable.) If you find your ionizer doesn’t interfere, then you can uncomment the code to make the motion detector active. Search for “Ignore the motion detector for now” in the source. Then if it detects motion it will turn the ionizer off right away.

Supplies

DSC00850.JPG
  • Adafruit ESP32-S2 Feather or similar.
  • A small LiPoly battery to power the Feather when the car power is off. I used a 3.7V 350mAh. Larger capacity should work fine too.
  • A USB data cable for the Feather.
  • Arduino development environment
  • At least half-size standard proto board.
  • Optional solderable version of the proto board once the hardware is working.
  • Battery powered car ionizer with USB charge port and physical power button (not capacitive touch).
  • A USB charge cable for the ionizer (that we can cut and solder into the project)
  • TLP3553A solid state relay
  • BL412 PIR, passive infra-red, motion detector module
  • 2 of 10K ohm resistors
  • 150 ohm resistor
  • 100 ohm resistor
  • red LED
  • a small SPDT switch with pins spaced to fit the proto board.
  • proto-board jumper wires
  • a 3 pin section of header pins
  • a 5 pin section of header pins
  • optional solid wire of various colors for soldering

Start on a Protoboard

DSC00848.JPG
schematic.png

This project was constructed using the Adafruit ESP32-S2 Feather - 4 MB Flash + 2 MB PSRAM. This project should be possible with similar microcontrollers.

Solder the header pins on the Feather and insert into the proto board with the USB connector at one end so it's accessible. Do not connect the battery at this point.

Downloads

Program the Microcontroller

Connect the Feather USB data cable to the computer and start the Arduino IDE. Select the ESP32-S2 Feather as the active device and serial port in the IDE. Open or copy/paste this source in the IDE. Compile and flash the program onto the Feather. If there are problems flashing the program onto the Feather, make sure the USB cable is not a charge-only cable, as a first guess. The Adafruit site has excellent help information for doing all the above. The serial output should show that the program is running even if the rest of the hardware isn’t there yet. Disconnect the USB cable while adding the rest of the hardware components.

Downloads

Power Jumpers

Connect power from the Feather to the buses on the proto board. Connect the ground jumper from the Feather to the bottom - bus at column 4. Add jumper from bottom - bus to top - bus at column 1. Add jumper from the USB power output on the Feather to the top + bus at column 7.

Motion Feedback

Add the motion detector feedback red LED. Add the red LED with the negative lead in the top - bus and positive lead in the upper section of column 19. Add the 100 ohm resistor in the upper group from column 11 (Feather PIO 10) to column 19.

Power Sense

Add the USB power sense voltage divider. Add a 10K ohm resistor from the top + bus to the upper group at column 20. Add a 10K ohm resistor from the upper group to the lower - bus at column 20, skipping over the five holes for the lower group. Add a jumper in the upper group from column 10 (Feather PIO 11) to column 20.

Hack the Ionizer

Open up the ionizer and solder a pair of solid wires across the physical power button. Run the wires out of the case through an existing opening or drill a new one for them. Reassemble the ionizer.

Add a 5 pin section of header pins to the upper group of columns 22 to 26. Solder the wires to the end pins (in no particular order). Cut off the center pin of the 3 pin section of header pins. Add it from the upper - bus at column 4 to the upper + bus at column 6. (the pins may have to be bent out a little)

Cut the ionizer USB charge cable and solder the negative lead to the 3 pin header at column 4, and the positive lead to the 3 pin header at column 6.

Add the SPDT switch in the upper group across columns 25, 26, and 27. Switch it to the right, off.

Solid State Relay

Add the solid state relay. Insert the solid state relay in the center of columns 21 to 22 with pin 1 (with the dot) in the lower group of column 21. Add a jumper from the upper group column 14 (Feather PIO 5) to the lower group column 21. Add a 150 ohm resistor from the lower group column 22 to the lower - bus. Add a jumper from the upper group column 21 to the upper group column 25.

Motion Module

Add the PIR motion detector module. Insert the module in the center of columns 29 to 30 with pin 1 in the lower group column 29. It may help to take the clear cover off to be able to see the little metal tab pointing down between columns 29 and 30. Add two jumpers from the lower group columns 29 and 30 to the lower - bus. Add a jumper from the upper group column 30 (pin 3) to the upper group column 13 (Feather PIO 6). Add a jumper from the upper group column 29 (pin 4) to the upper group column 12 (Feather PIO 9).

Dry Run Part One

Power it up for a dry run. Make sure the SPDT switch is to the right/off so that the ionizer doesn’t power up for the test. Connect the Feather USB cable to the computer. The serial display in the Arduino should have a message about “source power is on” and the neo pixel should be magenta.

Connect the battery to the Feather. If it is charging the little amber LED on the Feather next to the USB connector should light. Connect the ionizer charge cable, if it isn’t already. The ionizer battery should start charging. It might be necessary to wait and let the batteries charge at this point if they aren’t already charged.

Dry Run Part Two

Dry run continued. Once the batteries are charged enough, disconnect the Feather USB cable. The feather should switch to running off the battery. The neo pixel should show blue indicating the startup delay. This is the wait to let the people exit the car.

After two minutes the neo pixel should change to orange. The motion detector should now be active. Waving a hand over the motion detector should cause the motion detect feedback red LED to light.

After about a minute the neo pixel should change to red. The ionizer would be on at this point if the switch wasn’t off.

After ten minutes the neo pixel should change to green. The ionizer would be off until the next cycle.

Full Test

Test with everything enabled. Do this outside or in some well ventilated space so the output of the ionizer isn’t a problem. Move the SPDT switch to the left/on. Connect the Feather USB cable to power, for example a USB outlet, that is on, in the car. The neo pixel should be magenta.

Disconnect the USB cable, as in step 10 above. The steps should be the same as there but the ionizer should turn on at the same time as the neo pixel is red.

At this point it should be ready to go. Connect the Feather USB cable to a car USB outlet that is off when the car is off, and it should run the ionizer after the people have left the car.