Arduino dosing controller build

That motor shield you have uses L293D chips (hence the name of the shield). The D on the chip means it has internal diodes (and lower current capacity than the L293 chips). I checked when you posted that last wiring setup because i noticed the lack of diodes on the motor. It actually has two diodes per motor, so you can run them both ways and be protected.
 
That motor shield you have uses L293D chips (hence the name of the shield). The D on the chip means it has internal diodes (and lower current capacity than the L293 chips). I checked when you posted that last wiring setup because i noticed the lack of diodes on the motor. It actually has two diodes per motor, so you can run them both ways and be protected.

Sweet, good to know gorgok. I think I remember reading that about the motor shield before I bought it but I guess I had forgotten. How do my connections look with everything? I'm still unsure about how the rotary encoder ties in... Also is it alright how I am running the LCD and the Rtc off of the same circuits or should they be separate?
 
Zachts, I noticed you put what I think are resistors or diodes? between motor leads to reduce conductive kickback right? I wonder if I should do the same or does my motor shield protect from that problem? Also, do I need to put resistors anywhere else in my circuitry?

Mbingha, not sure what gear you've got already but I'm trying to make this build so I can do an instruction thread for total noobs. I'm working out every angle so in the end, the instructions will give people an exact parts list, totally clear step by step building instructions, and finally the debugged code ready for download so it's super easy for anyone to build their own doser. I have zero experience in programming or micro controllers, this is my first project like this. So I bet you could do it too! :beer:

lol that pretty much sums it up for me. I think anyone that can be successful in this hobby can probably pick up most DIY projects, its just a matter of spending the time to familiarize yourself with the ins and outs of what you are building. For me, I simply don't have as much time as I thought I would when I initially purchased the arduino. I'll get it built and working, just not in the time frame I had hoped. Before I purchased the arduino, I didn't even know how to solder haha.
 
Another perhaps slightly easier option is to buy an off the shelf dosing pump like one of these and simply control an AC outlet with either a relay or SSR. Sainsmart has some pre made boards that are pretty cheap and work.

It all depends on just how DIY you want to be.
 
Another perhaps slightly easier option is to buy an off the shelf dosing pump like one of these and simply control an AC outlet with either a relay or SSR. Sainsmart has some pre made boards that are pretty cheap and work.

It all depends on just how DIY you want to be.

Maybe a slightly easier option, yes. But if you're doing 2-4 dosing pumps the price and bulkiness of a project like that may not make it advantageous over just buying a cheap and completed dosing system like this. http://www.ebay.com/itm/MC-03-M-Dosing-Peristaltic-Metering-Pump-Triple-for-Aquarium-Lab-Reef-/360842983871?pt=LH_DefaultDomain_0&hash=item5403eaf9bf
 
Are you out of pins for the rtc? Seems if your just trying to get the pumps to work. Then display status? What pins are you short on? Communication ones? If the pumps are 30ma? My sainsmart and arduino nanos have no problem with 30 ma relays. if you have no override buttons? I might be confused of what your asking? If 5v is too much, get a pot or something else to step the voltage down. I think I am confused what you are asking though.
 
Are you out of pins for the rtc? Seems if your just trying to get the pumps to work. Then display status? What pins are you short on? Communication ones? If the pumps are 30ma? My sainsmart and arduino nanos have no problem with 30 ma relays. if you have no override buttons? I might be confused of what your asking? If 5v is too much, get a pot or something else to step the voltage down. I think I am confused what you are asking though.

Ok, I don't think I'm out of pins, just trying to consolidate everything if possible. Yes, my goal is to have control with my rotary encoder through a menu on my LCD. The menu would allow me to set daily run times on each pump. That's pretty much all I want to do, pretty simple. So here are my latest photos of the hardware, hopefully they are clear enough. Essentially what I'm asking is: if you take a close look at the below photos- are all my wiring connections and components put together correctly to achieve my goal? Or do I need to change pins or connections anywhere before I attempt the sketch?

If you need a clearer photo or description of wiring layout of something specific just let me know and I'll be sure to reply.
The latest photos:

picture.php


picture.php


picture.php


picture.php
 
Last edited:
Maybe a slightly easier option, yes. But if you're doing 2-4 dosing pumps the price and bulkiness of a project like that may not make it advantageous over just buying a cheap and completed dosing system like this. http://www.ebay.com/itm/MC-03-M-Dosing-Peristaltic-Metering-Pump-Triple-for-Aquarium-Lab-Reef-/360842983871?pt=LH_DefaultDomain_0&hash=item5403eaf9bf

Yes - many times it seems like you could do it a lot cheaper yourself, until you figure in all the details, then suddenly it's not so cheap! Of course there may be other advantages to doing it yourself, like the customization or simply the enjoyment of doing the project yourself.

Are you out of pins for the rtc? Seems if your just trying to get the pumps to work. Then display status? What pins are you short on? Communication ones? If the pumps are 30ma? My sainsmart and arduino nanos have no problem with 30 ma relays. if you have no override buttons? I might be confused of what your asking? If 5v is too much, get a pot or something else to step the voltage down. I think I am confused what you are asking though.

The RTC uses the i2c interface (an addressable serial interface protocol built into the Arduino; ) it appears the LCD does as well. i2c only uses 2 pins plus Vcc and Gnd, no matter how many devices you have connected to it.

You can also get I2C expander chips that give you more input or output pins if you should need them.
 
The RTC uses the i2c interface (an addressable serial interface protocol built into the Arduino; ) it appears the LCD does as well. i2c only uses 2 pins plus Vcc and Gnd, no matter how many devices you have connected

Yes, my LCD has been converted to i2c with the black backpack chip, and the Rtc is already i2c. So, given the fact that i2c components can share the same SDA and SCL circuits with eachother, is it fine how I wired my LCD and RTC together there on the breadboard? They're also sharing the 5v and GND circuits, but I powered the rotary encoder from a separate 5v pin (gray wire from rotary encoder) just to be safe, but the rotary encoder GND (red wire from rotary encoder) is shared with the LCD and RTC. Is it okay to do it like that?

I don't think running out of pins will be a problem at all on this project.
 
Last edited:
Yes, all the grounds on the Arduino are connected, so it doesn't matter if you use a separate ground pin or not. I believe all the 5V pins come from the same regulator output as well, but I'm not positive on that. The only thing you need to check is that the total current draw of your devices doesn't exceed the current capacity of the arduino supply. If it does, you can get a separate 5V supply for devices, just be sure to connect all the grounds.

I2c devices are made to share the Data & clock (SDA & SCL) lines, that's the whole point. in my project I have a RTC on a prototyping shield directly on the arduino, an RTC LCD in a separate box and 2 RTC expanders in separate boxes for the outputs.
 
Yes, all the grounds on the Arduino are connected, so it doesn't matter if you use a separate ground pin or not. I believe all the 5V pins come from the same regulator output as well, but I'm not positive on that. The only thing you need to check is that the total current draw of your devices doesn't exceed the current capacity of the arduino supply. If it does, you can get a separate 5V supply for devices, just be sure to connect all the grounds.

I2c devices are made to share the Data & clock (SDA & SCL) lines, that's the whole point. in my project I have a RTC on a prototyping shield directly on the arduino, an RTC LCD in a separate box and 2 RTC expanders in separate boxes for the outputs.

Very helpful. Okay well I guess I should get the current draw data for my Rtc, LCD with i2c backpack, and rotary encoder. Then simply add them together for my current draw sum. And according to my research, the arduino's max output per I/O pin is 40mA, and the 5v pin has an output rated for ~400mA when powered via USB cable, or ~900mA when powered via 7v external power adapter. Mine is a 12v 750mA supply to arduino. I have read that as the current draw from connected components (ie LCD, Rtc...) increases and/or the adapter input voltage increases from 7v, (to 12v in my case) then the amount of heat the regulator has to deal with also increases. In effect, this causes the maximum output current of the 5v pin to drop. How much this will happen on my particular setup- I don't know... First, though, I need my total current draw for my components. It may be well under 900mA, in which case I will probably just call it good to go.
 
update : i tried testing current on my components but i cant fit my probes on the multimeter in the tiny breadboard holes. Im wondering if its even worth my time because im thinking the lcd, rtc, and rotary encoder are very low mA draw.
 
where did you get the parts from? The RTC modules are usually DS1307s that only take 1.5 mA when in use and something like 200 µA in standby mode. The LCD will take more than that, but should take nowhere near the Arduino's maximum current. The rotary encoder will take a negligible amount of current (basically whatever the pull-up resistors take.) The big current draw will be the motors.

you if you want to check voltages/currents, you can simply take some 20g wire and plug that into the breadboard holes and touch the multimeter probes to those. (a paperclip might work, too.)
 
The big current draw will be the motors.
If you want to check voltages/currents, you can simply take some 20g wire and plug that into the breadboard holes and touch the multimeter probes to those. (a paperclip might work, too.)

Good idea on the 20g wire, I'll do that. Also, everything I bought was from various sources on ebay, including motors claiming to only use 30mA each. I'll take current readings soon. As for the sketch, I'm a bit unsure where to start looking for other people's bits of sketch, and I'm gonna be doing a lot of reading so I may take a bit of a hiatus from here unless I have questions. Any and all sketch suggestions welcomed...
 
Sorry guys. Work just picked up like crazy for springtime. I'll be back on this project soon though, working every day of the week at the moment...:debi:

That's better than being unemployed, Make that money then get back on it! I'm going about the same thing and picked up the motor shield the other day. If I get any time myself, we can collaborate and get this thing done. Time for me is limited as well... my wife is 35 weeks pregnant and I'm preparing to get my P.E. licence. :beer: :thumbup:
 
That's better than being unemployed, Make that money then get back on it! I'm going about the same thing and picked up the motor shield the other day. If I get any time myself, we can collaborate and get this thing done. Time for me is limited as well... my wife is 35 weeks pregnant and I'm preparing to get my P.E. licence. :beer: :thumbup:

Yes, I'm definitely not gonna abandon this project, I'm eager to see the fruits of my labor. Coding will be the next challenge. I'll be back on in a while. I'm a swimming pool contractor so this time of year always gets nuts!
 
Yes, I'm definitely not gonna abandon this project, I'm eager to see the fruits of my labor. Coding will be the next challenge. I'll be back on in a while. I'm a swimming pool contractor so this time of year always gets nuts!

I'm currently working on code and I'm trying to incorporate temp sensors and an alarm. Eventually I'd like to add some buttons and a menu function but that won't be in version 1.
 
Back
Top