|
|
Mar 23, 2022 13:05:37 GMT
|
This thread is going to be for my Arduino projects. There must be loads of people who bought Arduinos and never used them for anything useful! I use them at work to control various bits of kit, but I've also used them to take control of various tasks on my car and a few fun projects which are ongoing. These are all currently in-use or work in progress. Contents (click links to the relevant posts as I put them in): 1) Simple Arduino Discharger 1: Hybrid battery cycler for my Honda Insight next post2) Simple Arduino Discharger 2: Mk2 of the above click here3) Arduino hybrid boost controller for my Insight hybrid system click here4) Arduino traffic light timer/controller for dad's man-shed traffic lights click here5) ? 6) Profit
|
|
Last Edit: Apr 19, 2022 12:52:16 GMT by Jonny69
|
|
|
mrbig
Part of things
Semi-professional Procrastinator
Posts: 461
|
|
Mar 23, 2022 14:04:08 GMT
|
I'll be watching. My son has one and I quite fancy getting in on it too but need a decent project to kickstart me into doing it. I've often wondered if one could be used to give digital readouts of temps/pressures on a small OLED screen in my beetle.
|
|
1969 German Look Beetle - in progress
|
|
|
|
Mar 23, 2022 14:08:06 GMT
|
1. Simple Arduino Discharger 1 The problem: The hybrid batteries on the Honda Insight are now a minimum 16 years old. They're NiMh technology and made up of 120 cells in series. They have nothing in the way of battery management. That means as the cells charge and discharge, over time they get out of balance with each other. With no battery management, some cells then sit nearly fully charged, while others in the pack are nearly empty. Memory effect creeps in and the battery goes out of whack, which causes the IMA light to come on in the car. The solution: The science is that you can reverse the memory effect in a NiMh cell by discharging it to 0.8-0.7V and its capacity can be recovered significantly by doing so. Someone on Insightcentral worked out that you don't need to strip the pack and individually cycle the cells. You can do it at pack level as long as you a) discharge very slowly to prevent holding the cells reversed while forcing too much current through them and b) start by discharging to a relatively high voltage, recharge the battery and then discharge and repeat to incrementally lower voltages to help with a). What people were doing: Most Insight owners have fitted a grid charger so they can occasionally charge the hybrid battery from the mains. This is an ideal place to also discharge the battery. By far the simplest way to do a discharge was to connect it up to a lightbulb and periodically check the voltage. That was a slow, arduous task. Additionally the voltage in a NiMh pack stays pretty much constant until the very end when it suddenly drops, so a 17-hour discharge could be quite an affair if you wanted to do it accurately. What I did differently. I figured an Arduino could monitor the discharge and automatically shut it off at a pre-determined voltage. I could use resistors on a heatsink instead of lightbulbs, and that meant I could stack them up to discharge quickly through the bulk of the charge and then slowly below a certain voltage to look after the cells. This is a much shorter version of a thread I posted on Insightcentral. Here's what I started with. An Arduino UNO, a computer PSU for power and the case, and some 100W resistors: I did a test setup with the code I'd written, using a pair of lightbulbs to test the discharge switching and it worked really well: Then I worked at fitting it all in the computer PSU case, which turned out to be far too small: Added some Dymo labels and this is it:
|
|
Last Edit: Mar 23, 2022 15:20:32 GMT by Jonny69
|
|
|
|
Mar 23, 2022 14:13:49 GMT
|
Graph time. I wanted to illustrate how much more detail is captured by this compared to manually logging a discharge. In the past, I'd mused how a shallow jaggedy-looking discharge curve probably points to individual cells dropping out during the discharge. But when does this actually happen? When you manually note the discharge voltages, say every 30 or 60 minutes, you lack the detail to pinpoint it. This is the kind of shallow, jaggedy discharge curve I'm referring to. Here is a discharge I did when my battery was playing up last winter. Aimed to discharge to 120V, manually noted the voltages every hour. See it's got a very shallow drop-off which is not the expected characteristic curve of a NiMh: After a couple of charge/discharge cycles, the curve looked like this. Capacity is clearly restored. Much closer curve to what is expected: So in the absence of detail, what actually happened in the top curve? Now look at the discharge I logged in the test discharge I carried out above. I did this discharge because the pack was starting to get grumpy. Discharged to 140V. Same bulbs used as on those graphs above, but this time logging the detail. Lower rate of discharge kicks in at 145V, you can see the change in slope. There's about 2 hours of discharge missing from the beginning of the plot which I'm not bothered about, but there are two definite steps in the data: Zoom in a bit on the two steps ENHANCE. Both of these relate to a drop of around 2-3 volts. It's not so clear on the second step, but the first one looks like it has two humps. I think both of these steps show two cells dropping out. In the first step they happen very close to one another, and in the second step they both go at about the same time. If the discharge was continued lower, you'd see more and more of these happening. This was interesting stuff.
|
|
|
|
|
|
Mar 23, 2022 14:24:08 GMT
|
2. Simple Arduino Discharger 2 I noted a few things on Insightcentral I'd do differently if I did this again: 1) I'd use a larger case so everything can lay flat. Upright like this means it all fits but I have to assemble it in a particular order, it's REALLY fiddly and the wires all have to be quite short else they won't go in. Having to mount things in the lid is also a nuisance. 2) A case with thicker metal would be easier to work with, too, preferably aluminium or even plastic instead of steel. 3) I underestimated the number of wires and it could do with a lot more screwdown terminals, particularly +5V and 0V points. Using a 2x relay board instead of two singles would mean one less 5V and 0V connection - worth thinking about that sort of thing in advance. 4) Trigger high relays. It's just safer because they stay off no matter what. 5) External reset button would be useful. I will probably add one next time I've got it apart because there's not enough space to get to the pins now it's assembled. Edit: 6) Longer leads. Longer leads are your friend. I did have to change a few things and decided to change the case too, mostly because changing anything involved this: It also got dangerously hot when discharging. So that led to Mk2 in a new case with space to lay everything out flat and with a second heatsink: Still plenty of Dymo labels: All my code etc is listed in the Insightcentral thread. It works really well, but please remember I'm not a coder. I'm just posting this here for fun/interest, not for code critique. But obviously do chip in with any obvious improvements!
|
|
Last Edit: Mar 23, 2022 15:20:48 GMT by Jonny69
|
|
|
|
Mar 23, 2022 15:41:36 GMT
|
3. Hybrid boost device for the Honda Insight This was something silly I worked on over lockdown. On the Insight, you've been able to buy a PIC-based device that interrupts the signal to the hybrid system and tells it to add more assist or more regen. Peter Perkins has published the code for anyone to build their own if they want to. I figured I could probably re-engineer it to work on the Arduino, as you do. Why bother? Well apart from making the car quite lively, I spend a lot of time creeping in traffic. If the car uses more motor and less engine, it's better on fuel when sitting in traffic. I can also control whether it accelerates on more or less motor and how aggressively it comes in. So it's quite simple how it works. The assist and regen is controlled by a single 2khz PWM signal. The duty cycle tells it whether to assist or regen and by how much, or do nothing. All you have to do is interrupt the signal and modify it and you can get it to do more (or less) work and control how quickly it comes in. I haven't posted my code anywhere because I haven't actually posted about it on Insightcentral either, but this is it running on the bench: One Arduino is supplying the variable 2khz PWM and the other is modifying it. Scope was set up to flick between them. Once I was happy that was working, I started wiring it up with some pots on a small board on the end of a length of multicore. I would have used ribbon cable but I didn't have any... Wired up: The Arduino end with break-out board added to the top: The small board with pots which control the assist and regen level, for next to the driver's seat: Now, that has sat in my electronics box for well over a year. I talked myself out of fitting it for various reasons but I think now is time to do it. At lunchtime I boxed up both ends with a case and knobs for the pots and a bumper case for the Arduino: I'll be able to just sling those in the car temporarily with cable ties and not worry about them. All I really need to do before fitting it is re-familiarise myself with the wiring, because there's a LOT of it: I should probably copy some of this into my reader's rides thread.
|
|
Last Edit: Mar 28, 2022 15:59:46 GMT by Jonny69
|
|
|
|
Mar 24, 2022 20:25:56 GMT
|
Very interesting stuff, something I'd like to experiment a little with myself.
|
|
|
|
|
|
Apr 19, 2022 12:51:03 GMT
|
4) Arduino traffic light timer/controller for dad's man-shed traffic lights Packaged in a box that looks like this: One wire for 240V in. Three 240V out for red, amber and green lights. I tried to talk my dad into using 12V LEDs to make it a bit safer but he was adamant he could only use 240V lamps. This is what's inside: The Arduino UNO is down at the bottom in a bumper case. On top of that is a 4x relay shield to turn the lamps on and off. Then on top a break-out board to distribute the 240V to each relay. I used glands, lol: (Only posting that so I can childishly use the word gland a couple of times) They do this, which I'll change to a video once I work out how to edit the sound: The code is pretty basic and looks like this: int red = 7; // red light on digital pin 7 = Relay1 on shield int yellow = 6; // amber light on digital pin 6 = Relay2 on shield int green = 5; // green light on digital pin 5 = Relay3 on shield
void setup() { pinMode(red, OUTPUT); pinMode(yellow, OUTPUT); pinMode(green, OUTPUT);
digitalWrite(red, LOW); digitalWrite(yellow, LOW); digitalWrite(green, LOW); }
void loop() { // red digitalWrite(red, HIGH); digitalWrite(yellow, LOW); digitalWrite(green, LOW); delay(30000);
// red/amber digitalWrite(red, HIGH); digitalWrite(yellow, HIGH); digitalWrite(green, LOW); delay(3000);
// green digitalWrite(red, LOW); digitalWrite(yellow, LOW); digitalWrite(green, HIGH); delay(30000);
// amber digitalWrite(red, LOW); digitalWrite(yellow, HIGH); digitalWrite(green, LOW); delay(3000); }
Basically runs a loop starting on red for 30 seconds, red/amber for 3 seconds, green for 30 seconds, amber for 3 seconds, back to red and simply loops round and round.
|
|
|
|
filmidget
East Midlands
Mostly Lurking
Posts: 1,652
|
|
|
The traffic light thing was exactly what I had in mind for my newly extended garage, if I ever finish the house bit of the extension. Mind if I steal your code? Although I am certainly sticking with 12v! I attended a 1 day course on getting started with Arduino, run at Nottingham Hackspace, then managed to start playing with a few projects - good fun, but then building works started and I have forgotten what little I did know. The guy running the course is a electrical engineer and had made some great things, my favourite being the nixie tube clock, bit like this: I only got as far as playing with turning LED's on and off with different inputs really, peaking with a stack of LED's that lit up progressively from a throttle on a gaming joystick - didn't think that was bad for somebody whose last contact with 'electronics' was with a few transistors, resistors and capacitors in a technology GCSE over 30 years ago! I have a few ideas for projects, and would be interested in any other of your projects you care to post up.
|
|
'79 MG Midget 1500 - Still patiently awaiting attention '02 Vauxhall Astra 1.8 Elegance(!) - Better than you might think '03 Mazda MX5 - All new and shiny looking (thanks to Antony at Rust Republic) '09 Renault Clio - Needs to go.
|
|
|
|
Apr 20, 2022 10:04:03 GMT
|
The traffic light thing was exactly what I had in mind for my newly extended garage, if I ever finish the house bit of the extension. Mind if I steal your code? Although I am certainly sticking with 12v! Yeah of course you can steal my code. Just check the pins trigger the same relays on whatever relay shield you use. If you're using 12V, you can use any old relay shield clone which are far cheaper than the 240V ones. That nixie clock looks good. I quite like that look with the wood with black top. I did have some nixie tubes in the post coming from Ukraine, but it looks a bit like they might not be coming after all. Will just have to see.
|
|
|
|
|
|
|
On top of that is a 4x relay shield to turn the lamps on and off. Can I ask please who you use for parts like these? For my first "real" Arduino project I was trying to replace my old mains timer unit that stopped working, I use it to turn my hi-fi into a clock radio. It needs to switch mains voltage, and while I joined the Arduino forum and started looking around, most of what I was seeing was warnings about not using cheap relays, but no advice on where was a good place to buy from (and probably because of the varying countries that forum users are from).
|
|
|
|
|
|
|
Can I ask please who you use for parts like these? I used a cheap eBay one for this. I was going to use a Seeed Studio shield like we use at work for various things, which is what you'd call a good quality one, but the eBay one had 250V relays on it and I decided to check it out. Just used a UK seller to make it easier to return if it was rubbish. Seeed Studio relay shield: wiki.seeedstudio.com/Relay_Shield_v3/ (they do all sorts of stuff) You can get it from RS: uk.rs-online.com/web/p/shields-for-arduino/1743234You can get clone shields for buttons on eBay, but most of the better ones you can get from RS. Actual Arduino-branded shields are getting hard to find now.
|
|
Last Edit: Apr 21, 2022 8:36:32 GMT by Jonny69
|
|
|
|
Apr 21, 2022 11:59:27 GMT
|
Thanks, I'll have a dig around. For my application I only need the single relay. I haven't touched the project in ages, I ought to get on with it again really.
|
|
|
|