Author Topic: Motequito Magnet  (Read 1894 times)

Reck_law

  • NewMember
  • *
  • Posts: 9
Motequito Magnet
« on: June 16, 2014, 12:12:21 PM »
Hi all

I have a mosquito magnet that the controller board died and I used the 12 v AC power supply on another one.  I figured why not build my own controller and have it send back status.  My plan is to use a moteino to control everything.  My first run will be to see if I can get it running with MOSFETs, replacing the thermo couple with a ds18b20, power it with 12v dc, and code with no error handling.   Being able to update the code with out tearing apart the MM will be a big plus.  I will be updating what I am doing and including pointers to where I am getting my ideas from.  As I progress I will add error handling to tell me when to replace the propane and other issues.

Jeff

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Motequito Magnet
« Reply #1 on: June 16, 2014, 01:15:48 PM »
Sounds interesting, thanks for sharing and looking forward to see your progress ;)

Reck_law

  • NewMember
  • *
  • Posts: 9
Re: Motequito Magnet
« Reply #2 on: June 25, 2014, 05:52:52 PM »
I started my code on an arduino uno so moving it to the mote means that I will have to change some of the pins I used (to preventWanting to add two more interrupts I am going to try PinChangeInt.  This will allow me to use any pin as an edge interrupt.   Thought I would mention it if anybody else wants more than 2 interrupts.  I am going to do some experiments and will post results.  Thanks to Felix for the quick delivery.

luisr320

  • Sr. Member
  • ****
  • Posts: 255
  • Country: pt
Re: Motequito Magnet
« Reply #3 on: June 26, 2014, 04:42:35 AM »
You could use a couple, or more, of diodes and use the same interrupt pin for multiple interrupt. I tried it with a Moteino and works great.
The idea is very simple: send a input signal to a input pin and to the interrupt pin simultaneously. The interrupt would fire a ISR that will check which pin is high and act upon it. Using diodes you could connect multiple input pins to the interrupt pin and they will block the signal from getting to the other pins.
You can find an example here:
http://www.gammon.com.au/forum/?id=11091
For some reason, I could only make this work turning the diodes the other way around.

« Last Edit: July 05, 2014, 05:54:12 AM by luisr320 »

Reck_law

  • NewMember
  • *
  • Posts: 9
Re: Motequito Magnet
« Reply #4 on: July 11, 2014, 06:29:18 PM »
I have done some testing with PinChangeInt.   It works fine . I am planning to use A0, A1 as edge interupts to detect if either the start or stop button is pressed.  The coding is very easy as I don't care about bounce.  I only need to detect if it is pressed I don't care how many times.  This project is going very slowly as it is low on my honey do list.