Helping with rear lights on the bike with brake signal and turn lights.

Started to do some small Arduino projects 2 weeks ago. Still learning to code...

Found this forum straight away but a shame that topic that interested me are very old and I not allowed to comment or ask a question any more in those treads.

Here are the links to the treads that have very nice info as well as good comments from users.

https://forum.arduino.cc/?topic=267397#msg1888946

good comment here was from "groundFungus"

He/she said: The Nano can easily take care of blinking the turn signals. No need for relays anywhere as you can drive the lights with MOSFETs controlled by Nano digital outputs. Pick your LEDs. Once you know how many LEDs and their current requirements you can specify the transistors and power supply(s)."

Here is a very good tread too but without schematics not really helpful.

https://forum.arduino.cc/?topic=529475#msg3609198

I think, under the video on YouTube there were schematics but because the links are broken as the video posted many years ago...

I got my rear light working on my eBike with flasher relay. Light got from YAMAHA motorcycle, slightly changed plastic casing, then design a plastic bracket, so I can fit that on my bike under the saddle.

Idea is to get rid of flasher relay and replace my Arduino Nano or Pro mini (not sure what is more capable for the required task)

So what I need at the moment is help to make schematics with components and code for the rear light only:

Input;
turn left
turn right
rear main light (not sure how to do this as I prefer front light and rear light have the same switch...but I not sure if Arduino is capable with my front light which is 60w, one is 40w and another 20w)
brake sensor

output:
turn left
turn right
brake light

User "groundFungus" was ready to help in that tread :

https://forum.arduino.cc/?topic=267397#msg1888946

But needed amps of hoe much all lighting system will use the energy…

So these are the main calculation (Excel) and measurement with a multimeter.

Any suggestion or mission information, please ask. Hopefully, we are succeeded and I will make the video with schematics and code inside the video, so it stays on YouTube forever for somebody need to use in the future...

too much unnecessary external link.
could you explain it more clear?

  • explain your project!
  • explain what you already did!
  • explain your problem!
  • attach code/ schematic of your problem
  • explain what you need

We'll help you

rzk:
too much unnecessary external link.

Many links are just to tell people that I searched the forum before creating a new topic but unfortunately, those treads are "dead".

explain your project!

Its very simple, I need:
Nano or Pro mini (or maybe there is any suggestion of what type of Arduino better for these tasks...) taking care of blinking the turn signals & brake ligts. I believe I can drive the lights with MOSFETs controlled by Nano digital outputs.

explain what you already did!

I only did preparations, bought many different Arduinos so I can make tests. Only complete the rear lighting system with relay just to see how much energy it uses.

explain your problem

My problem in writing the right code and to do schematic. Code will be changing time to time as I learn more but schematic believe will stay the same.

attach code/ schematic of your problem

Haven't got anything yet...

explain what you need

Firstly help with components and I believe good to start with schematic, so I can order everything that is needed for the project if something missing...

If helps I can make up video of how my system works now...

Hello serginho007,
Welcome.

Found this forum straight away but a shame that topic that interested me are very old and I not allowed to comment or ask a question any more in those treads.

That's because they are answers to someone else's questions and whatever problems they were having. If they are helpful to you, good. If you have questions then you need to ask your own questions in your own thread, not jump on someone else's. If you jump on someone else's thread with your own project it just becomes a mess, which benefits no one.

Firstly help with components and I believe good to start with schematic

Are you asking for someone to create a schematic for you? If so, then please click on report to moderator and ask them to move this to gigs and collaborations. Please indicate how much you are willing to pay. If you want help with designing your own schematic then you need to post your best effort and indicate which parts you need help with. There's plenty of information on this site and generally on the internet to help you with creating a schematic.

You have said you have lights of 60W, 40W and 20W. These would require 5A, 3.3A and 1.67A respectively at 12V, which is lot different to anything in the spreadsheet you posted.

Thank you.

@serginho007,
Please take a look at the 8-channel Solid State Relay board I recently created here
http://www.crossroadsfencing.com/BobuinoRev17/
This chip may be all you need for the voltage & currents you list (12V, 348mA)
There are youtube links showing it in action driving a higher power LED

@serginho007, not to being rude but the forum didn't work like that
our knowledges is free, but we won't help from 0 scratch for nothing.
at least do a raw design and then ask for review at "Project guidance"

see this example of how to use this forum with manner

https://forum.arduino.cc/index.php?topic=713995.0

thx

I believe I can drive the lights with MOSFETs controlled by Nano digital outputs

Theres no reason why you cant.

However as has already been said please

1: present your aim clearly in a few words. Is it a push bike or a motorbike? It makes a difference especially to the supply requirements.

2: you want to flash lights. Mostly 1-2 watts, 12V - easily handled by mosfets.

3: START SIMPLE. ANY arduino will do, so use your nano or whatever on a breadboard. Wire it up to an LED and get it to flash.

Its like if youre designing a fighter aircraft from scratch - start with a paper aeroplane.

Here are the links to the treads that have very nice info as well as good comments from users.

Just FYI, they’re called “THREADS” as in ‘needle and thread", not TREADS as in “treads on a tire”.
Just sayin’…

Regarding your OP (Original Post).
As already pointed out, we are here to help, but we expect most of the work to be done by the poster.

If you know what you want, why don’t you draw
the circuit on a blank sheet of printer paper , take
a photo of it and post it ?

It appears that you have not yet even used the “Blink” example in the arduino IDE, because that has all the code
you need. All you have to do is modify it. It is the simplest , most basic , “hello world” type beginner example.

Also, we need to know what, if anything , you know
about electronics ? Your project is extremely simple
so we have to ask why you need our help ?
Are you posting because you want US to generate
a CAD schematic and write the code so YOU can use it to make a YOUTUBE video of what WE did
and take ALL the credit for it ?

raschemmel:
TREADS as in “treads on a tire”.

That would be “Treads on a tYre.”!

Just saying. :slight_smile:

In the USA it's "tIre"
"Tire | Definition of Tire by Merriam-Webster"

raschemmel:
In the USA it's "tIre"
"Tire | Definition of Tire by Merriam-Webster"

In the Queen's English, which is the MOTHER tongue, it's tyre. >:( :slight_smile: Teach me how to spell when Americans can spell colour, labour and criticise. :slight_smile:

Speaking of language, we arranged it so you wouldn't have to speak German...
and FYI, we arranged so we could have our own country so we wouldn't have you blokes telling us what to do.

England and America are two countries divided by a common language – George Bernard Shaw

England and America are two countries divided by a common language - George Bernard Shaw

After Hitler’s suicide in May 1945, Shaw approved of the formal condolences offered by the Irish Taoiseach, Éamon de Valera, at the German embassy in Dublin

Really ?

[Quote link](george - Bing bernard shaw on")
Why wasn’t he singing “Ding dong the wicked witch is dead !”

raschemmel:
Just FYI, they're called "THREADS" as in 'needle and thread", not TREADS as in "treads on a tire".
Just sayin'...

Treads are actually a form of footwear invented in Australia in the 70's.

Made from recycled car tyres.

treads.jpg

treads.jpg

raschemmel:
In the USA it's "tIre"
"Tire | Definition of Tire by Merriam-Webster"

That's because Americans can't speak English.

AJLElectronics:
In the Queen's English, which is the MOTHER tongue, it's tyre. >:( :slight_smile: Teach me how to spell when Americans can spell colour, labour and criticise. :slight_smile:

Well said.

Back on topic with just a couple of suggestions... :wink:

You should probably develop & test your code using regular LEDs that can be directly driven from the Arduino. The hardware can be worked-on separately. And you might want to built a test setup with switches & buttons if it's not convenient to have the bike in the same place you're programming.

The code will mostly be timers (see the Blink Example and the Blink Without Delay Example) and some if-statements.

...I've got to log-off now but I'll (hopefully) be back later.

...I'm back -

The Button Example shows you how to turn-on an LED when a button is pushed. (You can simplify the hardware by enabling the built-in pull-up resistor, wiring the switch to ground instead of to +5V, and reversing the program logic to turn-on the LED when the input goes low.

Just work on one thing at a time and "develop" your program by adding (and testing) one or two lines at a time.

For testing & debugging, take advantage of the Serial Monitor and send-out little messages like "left turn button pressed", etc. so you can "see" what your program is doing (or not doing).

Hardware - If your real switches/buttons can be isolated from the 12V, you're good-to-go. If you must have 12V connected you can use an **over-voltage protection circuit **with or without a voltage divider. (You can increase the series resistor to about 10K or if you use a voltage divider the resistors can sum-up to about 10K.)

To drive the LEDs you can use a MOSFET driver circuit or you can use a relay board. (The Arduino can't directly drive a relay coil but you can get relay boards with a built-in driver circuit.)

I'm tyred of hearing that.

Here's the thing: to build electronic circuits you have to learn electronics, which includes learning how to read and draw schematic diagrams. You use the forum search bar to search for related topics
or hou can google "arduino [followed by the topic] " followed by ["schematic"].
It would also help to learn "Ohm's Law".
The arduino IDE has examples that can be run by
clicking "File/examples".