Hello from Yorkshire

Please read this if you are new to the STM32


Message to all users

I've upgraded the forum (PHPBB) to version 3.1.10 which is the last stable release in the 3.1 tree.

As far as I can tell everything is still working OK, e.g. all posts look like they are there and the attachments are OK

If anyone has any problems please PM me.
PS. Don't PM the admin account as for some reason I still don't get email notifications of these PM's (but I never have ;-)

User avatar
Rick Kimball
Posts: 722
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Hello from Yorkshire

Postby Rick Kimball » Fri Jan 06, 2017 3:57 pm

BennehBoy wrote:BTW could anyone point me at a good reference for doing analogue voltage translation from 5v to 3.3v

Are you actually reading analog values or digital? Many of the maple mini pins are 5v tolerant if it is digital.

See the chart for the 5 V Tolerant ones:

http://wiki.stm32duino.com/index.php?ti ... Pinout.svg
-rick

User avatar
BennehBoy
Posts: 384
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Postby BennehBoy » Fri Jan 06, 2017 4:08 pm

racemaniac wrote:ehh, just a voltage divider? 2 resistors (or a potentiometer, then you've got an adjustable voltage divider)
https://en.wikipedia.org/wiki/Voltage_divider


This is what I intended to do, but after doing some searches people were suggesting all manner of craziness, opto isolators, opamps, etc etc.

I'm a relative novice so wanted to make sure I wasn't about to fry the STM32s when they arrive.

KISS FTW.

Rick Kimball wrote:Are you actually reading analog values or digital? Many of the maple mini pins are 5v tolerant if it is digital.


Reading analogue values - for example the boost sensor (MAP) that I'm using it driven from vehicle power (12 to 14.5v) and outputs a 0-4v DC signal, scaled linearly 1v= -1 bar, 4v= +3bar
Last edited by BennehBoy on Fri Jan 06, 2017 4:11 pm, edited 1 time in total.
-------------------------------------
https://github.com/BennehBoy

User avatar
Rick Kimball
Posts: 722
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Hello from Yorkshire

Postby Rick Kimball » Fri Jan 06, 2017 4:10 pm

That MAX13xx device you mentioned is 3.3v .. and talks via SPI. What else are you reading and how ?
-rick

User avatar
BennehBoy
Posts: 384
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Postby BennehBoy » Fri Jan 06, 2017 4:13 pm

Rick Kimball wrote:That MAX13xx device you mentioned is 3.3v .. and talks via SPI. What else are you reading and how ?


See previous post edit. I'm quite confident about driving the MAX since I'm already running that at 3.3v with the nano. (it is 5v tolerant on the SPI lines).
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 384
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Postby BennehBoy » Fri Jan 06, 2017 4:15 pm

I'm also reading NTC thermistors, but am driving those at 3.3v with 1kohm pulldown/divider so not an issue. Steinhart/hart beta coefficient to work out the temp.
-------------------------------------
https://github.com/BennehBoy

User avatar
Rick Kimball
Posts: 722
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Hello from Yorkshire

Postby Rick Kimball » Fri Jan 06, 2017 4:17 pm

If they are truly analog you will need to use a voltage divider or it will fry the analog peripheral.
-rick

User avatar
BennehBoy
Posts: 384
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Postby BennehBoy » Fri Jan 06, 2017 4:33 pm

Rick Kimball wrote:If they are truly analog you will need to use a voltage divider or it will fry the analog peripheral.


Yup will do, and yes it's truly analogue.... photo of bench test circuit below...

Image

It's a bit of a rats next, but essentially there's:
* a TSSOP14 to DIP adaptor housing the MAX31856, connected via Software SPI to the Nano
* a small amount of input circuitry on a daughter stripboard for the K-type, basically capacitors for filtering.
* pull down resistors for some of the analogue inputs - I've just been adding some fault detection code which flashes a warning graphic if a sensor is disconnected
* Software SPI to a single OLED display - unfortunately I've had to drive the OLED's and MAX from different software SPI buses because the libraries stomp on one another.
* Voltage divider/pulldown for the Bosch NTC M12 ( 0 280 130 026) Analogue input - already being driven at 3.3 volts.

Not pictured is the boost sensor part, because it's in the vehicle on the existing production setup. This is the part being used -> https://www.aliexpress.com/item/New-Hig ... 21605.html

There are probably other better choices but this part is the most economical that covers the range of pressures that I need.

I've found some posts on the forum that seem to suggest issues with multiple devices on the same h/w SPI bus, is this still the case?
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 384
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Postby BennehBoy » Fri Jan 06, 2017 4:41 pm

Here's the production system in the vehicle, minus any sensors hooked up I hasten to add!

Image

And this is my first love that it's monitoring :D

Image
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 384
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Postby BennehBoy » Sat Jan 07, 2017 4:46 pm

I've put the code on github if anyone is interested.

https://github.com/BennehBoy/LRDuino
-------------------------------------
https://github.com/BennehBoy


Return to “Welcome & FAQs”

Who is online

Users browsing this forum: No registered users and 1 guest