Hardware Project Ideas

I donā€™t know much about RC cars, but the headlight/turn signal thing sounds like a cool suggestion. External from the car it self, could be setting up a lap counter, or 1/4 mile drag strip (to scale of course) and either display time or winner/loser. Later on you could add a micro to record those times, or tweet them or whatever you are into.

Outside of the RC car stuff, a project Iā€™m working on that requires no code is some lighting for my workbench. I want to use LEDs, and therefore a driver with a PWM. Easily done with a micro of some sort, but Iā€™m just going to use a 555 and MOSFET or something. Adjusting the PWM can get interesting if you want it to. Initially I want to use some obnoxious old-school looking knob on the wall, I think that would be a fun addition. I also have one of these 4-button remotes https://goo.gl/YAYsrh that are SUPER simple to use to make my lights remote controlled and maybe set 4 brightness levels depending on the button I press. All this can be done without any code at all.

Thatā€™s what Iā€™m looking at doing that is not code heavy.

Brian

Hey Brian, that sounds like something I just completed (at least on some veroboard for testing it out. You can find it here. I donā€™t have any real use for it. but that does sound like a fun idea (additional lighting for a bench). I might look into that, when I have a more permanent bench going on.

I did have some quirks in the design that I used. Mostly on the low end of the pot. There was a band right at the bottom of the pot which wouldnā€™t vary the brightness at all and then it would jump from being barely lit to much brighter. From there though it had a mostly linear response. If you can suss out the cause, Iā€™d love to know. Otherwise, it works great and for what I wanted, a simple weekend project. Learned some stuff and I have a prototype that I can refer to later for other designs.

I was thinking about getting a simple remote like that (or building one [that sounds hard for motor control]) for the motor controls for an RC car, but havenā€™t decided yet. I think I just need to focus on building my own motor control circuit first.

You should be able to use your scope and investigate the cause of this deadband but this is a limitation of the design. The deadband is caused by the Vf of the diodes. The 1N4148 has a specified Vf at 10ma of 1V. Your circuit operates with much less current so the actual Vf is going to be a bit less, but the minimum is around 0.5V - 0.6V (refer to the graph on the datasheet). Until you reach that voltage nothing is going to happen, except for a little leakage current. You could try reducing the value of the pot to get through the deadband quicker and make it less noticeable. You may need to adjust the values of other components accordingly.

To eliminate the deadband would require a redesign eliminating the diodes. One possibility would be to use transistors. Another would be to use an actual PWM controller instead of a 555.

2 Likes

Kinda what I was going to say too. I might mock this up this evening and share some scope outputs. The way I understand PWMs to work is a 50% duty cycle @ 5v, the load ā€œseesā€ 2.5V. @ 100% it sees 5V, @ 25% it sees 1.25V. This is likely an over simplification and Iā€™m sure the formula is way more complicated and utilizes symbols found scratched in to cave walls by ancient civilizations that may or may not have been influenced by extraterrestrial visits. For example:
Iā€™m sure this means something to someone. That someone is not me.

Anyway using my, likely over simplified, understanding of PWMs, and looking at the datasheet for an LED, youā€™ll notice that an LEDā€™s output curve is not linear. Your brightness goes from 0 - full bright in the course of 20mA and within ~1v. Look at these graphs.

current vs. voltage on the left, and intensity vs current on the right. Even if my over simplified understand of PWMs is 100% wrong, this is why I think youā€™re seeing what youā€™re seeing. LEDs current goes from 0 to blast-off in no time at all. Which then translates to the brightness output graph on the right. Itā€™s like, nothing, nothing, nothing OMg is bright in here!

SO! Superimpose my understanding of PWMs on top of that you get this. (assuming 5v PWM)
Duty - LED on?
0% - nope
5% - nope
10% - nope
25% - maybe
30% - maybe
50% - Yup.
75% - OMg itā€™s bright!
100% - pretty much the same as 75% and a big shout-out to my current-limiting resistor for not letting me fry my $2 LED from AdaFruit. [Resistor: I got your back bruh]

You get the idea. So between your knob being turned 1/4 of the way and 3/4 of the way around, youā€™ve gone from no brightness to full brightness with most of the noticeable ā€œdimmingā€ being from 50-75% - 1/4 of a POT turn (see scaling comment below).

How do you overcome this? Dunno. Iā€™ve mitigated some of this by using a micro (like Arduino or RaspberryPi) by scaling your output to the input voltage range and get true percentages which is nice. this makes the POT ā€œfeelā€ more directly connected to the output (1/4 turn = 25% duty cycle). You could use a 10 or 20 turn pot maybe? or preset your PWM to start closer to the ā€œonā€ characteristics of the LED? Buy a prebuilt LED driver/controller (whereā€™s the fun in that?).

Another thing Iā€™ve sort of, internalized is that LEDā€™s are really on/off kinda of devices. The ā€œdimmingā€ you get is more/less an illusion from turning them on/off really fast. I mean, between that ā€œonā€ and ā€œON!ā€ current range there is some actual dimming going on, but the bulk of what you are seeing is perceived brightness.

So add all of THIS to the fact that your driver transistor/MOSFET or whatever also has an ā€œonā€ threshold you can see why there would be a VERY noticeable period of time where nothing is happening while youā€™re turning your knob. So, as 1.21Gigawatts was saying, youā€™ll first overcome the .6v for the diode/transistor, to get that to turn on, then you have to overcome the ā€œonā€ current/voltage for the LED(s).

Thatā€™s what I thinkā€¦
Brian

Oh OH! I made a video a couple years ago for some LED grow lights that dim/brighten (is that a word?) based on external light. Sun = no grow lights, cloudy day = some grow lights, no sun = full grow lights. At the time my wife and I lived in 1br apartment high-rise deal in Milwaukee. Our windows faced east and northā€¦soā€¦ our herb garden sucked. So I made these LED grow lights. Youā€™ll want to go full screen to see the scope outputs.

Light controlled grow lights

Radio shack light sensor feeds an ADC input on an Arduino. The Arduino then spits out a representative PWM signal which feeds some MASSIVE (itā€™s what I had on hand) MOSFETs which feed the LED strip. The darker it is outside, the brighter the LEDs are. The brighter it is outside, the dimmer the LEDs are.

Brian

It might have been a good idea to that before your post. :wink:

Not quite, the load sees an average of 2.5V. The load is either off or it is on at full voltage/current. In the case of LEDs, this happens at a frequency high enough that you donā€™t notice it, you perceive the average brightness or luminous intensity. If the duty cycle is 50% then the load sees an average power of 50% over time. But at any given instant it is either fully on or fully off.

That makes the rest of your post irrelevant.

Itā€™s actually quite simple if you break it down, and itā€™s even somewhat relevant to the discussion.

I would if I had one :frowning:. Iā€™m thinking about getting the AD2, since it would give me a lot of flexibility.

That being said, that makes a lot of sense. Iā€™m only driving it with 5V, so there isnā€™t much left after the voltage divider to turn on the diode. I might look at getting some schockey diodes if I ever need to use the circuit for something real. Maybe transistors if I really need no dead zone.

hahhaha, I really like this. But from what I can tell it is pretty linear in brightness over the whole range (minus the band at the start).

Thatā€™s a cool idea for lighting up your plants. I like it. Might have to use this for lighting around my computer or something (or plants as well).

I mostly get that formula, but is ā€œTā€ the period? So basically Vrms = sqrt ( 1/period * sum of voltage at time ā€œtā€ squared)? Not sure sum is the best word for what an integral does though.

But all the fun stuff requires a little programming! :wink:

One idea would be to add sensors and a data logger to your RC vehicle(s) to record things like actual speed, G forces due to acceleration/deceleration/cornering and crashes, battery voltage and current draw, the signals received from the transmitter as a reference, etc.

1 Like

Sounds like you are right, I get excited sometimes.

Great point. It seems my observations donā€™t always line up with what is actually going on. ā€œperceivedā€ is a great way to explain this.

I would love to see it broken down. While Iā€™m horrible at this (my college transcripts are evidence of that), math fascinates me and I wish I understood it better.

Yes, sort of,

Vrms = the Root of the Mean of the Squares for a given time (usually one or more complete cycles). As you know, to find the mean or average you sum a number (T) of samples and then divide by T. The lower case ā€˜tā€™ represents an instant in time.

Rather than obtain an average of a finite number of samples, the above equation uses the more accurate method of integrating an infinite number of samples where the ā€˜dtā€™ represents the infinitely small interval between two points in time.

I think you mentioned youā€™re moving so loading up on gear right now is hard so maybe this is a future thing. That AD2 is really cool. I donā€™t have one, but I watched Chris talk about it on his show once and itā€™s possible that will end up in my kit here soon. However, after your move, itā€™s TOTALLY worth getting a physical scope. Even a cheap or old one. Dave Jones did a video on the ā€œ$50 eBay scopeā€. EEVblog #1022 ā€“ Finding A $50 Oscilloscope On Ebay ā€“ EEVblog

I have a REALLY nice scope that I acquired as a gift, but before that I used a Tek TDS1002b which you can find on eBay for $115, and an OLD Tek T932 analog scope (which broke in MY move a month ago, grrrrr) which you can get on eBay for $45-$50 all day long. Get the AD2, but get a bench scope as well.

Thatā€™s cool! Sounds like your design is probably better than what Iā€™ve done. I tend to see the gap at the beginning, and then a taper off at the end. Again, this could be just my perception too. Iā€™m not measuring the light, Iā€™m just staring into it for hours on endā€¦ maybe thatā€™s the problem. :slight_smile: My LEDs seem to peak out in terms of brightness, then they sorta start to change color as I get closer to 100%, but not get any brighter. Anyway, I limit this all via software to protect myself fromā€¦wellā€¦myself and itā€™s good enough for bench/plant light.

Thanks!

Does Vrms specifically refer to sine waves, or is this an accurate way to calculate square waves as well? Does it matter in this case? Something that has confused me when calculating RMS in the past.

RMS itself does not refer to any particular waveform, but the method of calculating it varies depending on the waveform. Purely sinusoidal waveforms of a single frequency can be calculated simply using the ratio or sqrt(2). The above equation can be used for both sinusoidal and non-sinusoidal waveforms, such as square waves, of a single frequency. For an arbitrary waveform consisting of multiple frequencies you would use the summation method.

Iā€™m not opposed to coding. I just donā€™t want to get stuck in a loop of trying to get something working and itā€™s a result of me just not knowing enough about programming to do it right.

Ah yes, ā€œAverageā€ is the word I should have used.

I agree with this for sure. Itā€™s in my future to get, along with an actual bench supply.

1 Like

Something we do at the hackerspace is have a sort of scenario brainstorming session. This can be anything from making radios from junk bin parts to scenarios like the zombie apocalypse, solar flares, evil AIs and other things just to create a scenario people can start coming up with useful projects in.

It can be simple things like automatic pump controls for filtering and water management, power systems and storage, threat detection, communication devices, making a computer system out of simple parts. The list goes on. Weā€™ll sometimes build them for fun or challenges but mostly itā€™s practice in defining useful or necessary functions for projects.

It also gets people outside of their comfort zones and learning about other aspects of electronics. Why waste a microcontroller on something that requires fairly simple combinational logic in a scenario where such parts are very limited while others are plentiful? Itā€™s a bit like Iron Chef crossed with a survival show for electronics geeks.

If anything itā€™s a fun thought exercise to get ideas flowing.

1 Like

Thatā€™s a cool idea, Iā€™ll have to keep it in mind. :slight_smile:

I always wonder how that works out, I look at junk bins and see components that arenā€™t usually worth my time. Perhaps I should look harder though? Any components you think I should target? Motors maybe?

Most of the time theyā€™re not worth salvaging, but when you work under the constraint that the only parts you can use are in that box thereā€™s a bit of a context shift. You start seeing things you can use, rather than things that are so cheap and easy to get itā€™s not worth the time. You have to fit your design to whatā€™s available, and whatā€™s available is in that box of junk.

So whatā€™s on your list?

A list of parts to salvage? Not much at all. I play with old computers quite a bit so any microprocessor, memory, rom, etc that can be salvaged without damage gets pulled and put into a box to test.

As for the challenges I donā€™t really work with a list. I see whats in the box in the context of the goal and pull parts as I need them.

A common term for a board that you take parts off of is a donor board, but I prefer the US Navy cannibalization terminology. If you need to be at sea, or at sea and a critical piece of equipment breaks you sometimes have to steal components, cards, boards, etc. from working equipment to get it running. In port this is likely from another boat with the same piece of equipment. That gets a boat to sea and the one in port for a bit gets to wait on a replacement.